<template>
  <!-- 单、复选框 -->
  <div>
    <h3>单选框组</h3>
    <el-radio-group v-model="radio3" @change="radioGroupChange">
      <el-radio value="A">前端</el-radio>
      <el-radio value="B">后端</el-radio>
      <el-radio value="C">服务端</el-radio>
    </el-radio-group>

    <h3>事件绑定</h3>
    <el-checkbox-group v-model="checked2" @change="checkboxGroupChange">
      <el-checkbox value="1">前端</el-checkbox>
      <el-checkbox value="2">后端</el-checkbox>
      <el-checkbox value="3">服务端</el-checkbox>
    </el-checkbox-group>
  </div>
</template>

<script setup>
import {ref} from "vue";

const radioGroupChange = (val) => {
  console.log("radioGroupChange:", val)
}

//复选框
const checked2 = ref([])
const radio3 = ref()
const checkboxGroupChange = (val) => {
  console.log("checkboxGroupChange", val)
}
</script>

<style scoped>

</style>